namespace jQueryNET
{
	public class HeaderSection
	{
		#region Public constructors

		public HeaderSection()
		{
			m_Rows = new HeaderRowCollection();
		}

		#endregion

		#region Public methods

		#endregion

		#region Public properties

		/// <summary>
		/// 
		/// </summary>
		public HeaderRowCollection Rows
		{
			get { return m_Rows; }
		}

		public int CellCount
		{
			get
			{
				if (Rows.Count == 0)
					return 0;

				int cellCount = 0;
				foreach (HeaderCell cell in Rows[0].Cells)
					cellCount += cell.ColSpan == 0 ? 1 : cell.ColSpan;

				return cellCount;
			}
		}

		#endregion

		#region Private fields

		/// <summary>
		/// 
		/// </summary>
		private readonly HeaderRowCollection m_Rows;

		#endregion
	}
}